﻿<%@ Page Language="C#" MasterPageFile="~/View/Admin/Template.master" AutoEventWireup="true" CodeFile="QuanLyHoaDonNhap.aspx.cs" Inherits="View_Admin_QuanLyHoaDonNhap" Title="Quản Lí Hóa Đơn Nhập" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <table align="center" class="style1">
        <tr>
            <td align="right">
                Mã Hoa :</td>
            <td align="left">
                <asp:DropDownList ID="dropMaHoa" runat="server" Width="200px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td align="right">
                Mã Nhà Cung Cấp :</td>
            <td align="left">
                <asp:DropDownList ID="dropMaNCC" runat="server" Width="200px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td align="right">
                Số Lượng :</td>
            <td align="left">
                <asp:TextBox ID="txtSL" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                    ControlToValidate="txtSL" ErrorMessage="Phải  nhập số" 
                    ValidationExpression="[0-9]+" ValidationGroup="a" Display="Dynamic"></asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtSL" ErrorMessage="Không được trống" ValidationGroup="a"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                Đơn Giá :</td>
            <td align="left">
                <asp:TextBox ID="txtDGia" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                    ControlToValidate="txtDGia" ErrorMessage="Phải  nhập số" 
                    ValidationExpression="[0-9]+" ValidationGroup="a" Display="Dynamic"></asp:RegularExpressionValidator>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                    ControlToValidate="txtDGia" ErrorMessage="Không được trống" ValidationGroup="a"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td align="right">
                <asp:Label ID="lblThongBao" runat="server" Font-Italic="True" 
                    ForeColor="#FF3300"></asp:Label>
            </td>
            <td align="left">
                <asp:Button ID="btnThem" runat="server" Text="Thêm" onclick="btnThem_Click" 
                    ValidationGroup="a" />
            </td>
        </tr>
        <tr>
            <td align="center" colspan="2">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False">
                    <Columns>
                        <asp:BoundField DataField="sohdn" HeaderText="Số Hóa Đơn" />
                        <asp:BoundField DataField="mahoa" HeaderText="Mã Hoa" />
                        <asp:TemplateField HeaderText="Mã Nhà Cung Cấp">
                            <EditItemTemplate>
                                <asp:DropDownList ID="DropDownList1" runat="server">
                                </asp:DropDownList>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("mancc") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="ngaynhap" HeaderText="Ngày Nhập" />
                        <asp:BoundField DataField="Slnhap" HeaderText="Số Lượng" />
                        <asp:BoundField DataField="dgnhap" HeaderText="Đơn Giá" />
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Content>

